

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div style="display: flex; align-items: center; justify-content: center;">
        <canvas id="canvas" width="1000" height="500"></canvas>
    </div>


    <script>
        const canvas = document.querySelector('#canvas')
        const ctx = canvas.getContext('2d')

        ctx.beginPath()
        ctx.moveTo(100,100)
        ctx.lineTo(200,100)
        ctx.lineTo(200,200)
        ctx.lineTo(100,100)
        ctx.closePath()

        ctx.lineWidth = 10
        ctx.strokeStyle = 'black'
        ctx.stroke()

        ctx.fillStyle = 'pink'
        ctx.fill()




    </script>
    
</body>
</html>